#include<iostream>
#include<list>
#include "employee.h"
using namespace std;
Employee::Employee(){

}

Employee::Employee(string name,string employee_id,string depar,double basic,double reward,string sub_item,double subsidy,string dedu_item,double deduction){
    this->name = name;
    this->employee_id = employee_id;
    this->department = depar;
    this->basic = basic;
    this->reward = reward;
    this->subsidy_item = sub_item;
    this->subsidy = subsidy;
    this->deduction_item = dedu_item;
    this->deduction = deduction;
}

double Employee::sum_salary(){
    return this->basic + this->reward + this->subsidy - this->deduction;
}

void Employee::display(){
    cout <<"=========================="<<endl;
    cout <<"===姓名："<<this->name<<endl;
    cout <<"===工号："<<this->employee_id<<endl;
    cout <<"===部门："<<this->department<<endl;
    cout <<"===基本工资："<<this->basic<<endl;
    cout <<"===奖励："<<this->reward<<endl;
    cout <<"===补贴项目："<<this->subsidy_item<<"，补贴金额："<<this->subsidy<<endl;
    cout <<"===扣款项目："<<this->deduction_item<<"，扣款金额："<<this->deduction<<endl;
    cout <<"===总收入："<<this->sum_salary()<<endl;
    cout <<"=========================="<<endl;
}

string Employee::get_employeeId(){
    return this->employee_id;
}

string Employee::get_name(){
    return this->name;
}

string Employee::get_department(){
    return this->department;
}
